package base

import (
	"errors"

	xerrors "github.com/pkg/errors"
)

var errMy = errors.New("my err")

type error interface {
	Error() string
}

// 错误往上抛
func ErrTest() error {
	err := xerrors.Wrap(errMy, "测试错误")
	return err
}

func ErrTest1() error {
	err := ErrTest()
	return err
}

func ErrTest2() (result interface{}, resultErr error) {
	resultErr = ErrTest1()
	return
}
